#ifndef VSPASS_H
#define VSPASS_H
#include "VSObject.h"
namespace VSEngine2
{
	class VSSpatial;
	class VSCamera;
	class VSGRAPHIC_API VSPass : public VSObject
	{
		//RTTI
		DECLARE_RTTI;
		enum //pass type
		{
			PT_MATERIAL,
			PT_NORMALDEPTH,
			PT_PREZ,
			PT_MAX
		};
	public:
		virtual ~VSPass() = 0;
	protected:
		VSPass();
		VSSpatial *						m_pSpatial;
		VSCamera * 						m_pCamera;
		unsigned int					m_uiPassId;
	public:
		inline void SetSpatial(VSSpatial * pSpatial)
		{
			VSMAC_ASSERT(pSpatial);
			m_pSpatial = pSpatial;
		}
		inline void SetCamera(VSCamera * pCamera)
		{
			VSMAC_ASSERT(pCamera);
			m_pCamera = pCamera;
		}
		inline void SetPassId(unsigned int uiPassId)
		{
			m_uiPassId = uiPassId;
		}
		virtual bool Draw(VSRenderer * pRenderer) = 0;
		virtual unsigned int GetPassType() = 0;
	public:
		bool m_bEnable;
		
	};
typedef VSPointer<VSPass> VSPassPtr;
}
#endif